<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>角色授权</title>
    <link rel="stylesheet" href="/static/assets/layui-v2.5.6/css/layui.css">
    <link rel="stylesheet" href="/static/css/custom/layui.css">
    <style>
        .menu-tree{
            border: 1px solid lightgray;
            width: 74%;
            max-height: 300px;
            overflow: auto;
        }
    </style>
</head>
<body>
<div class="container">
    <form class="layui-form" id="queryForm">
        <div class="layui-form-item">
            <div>
                <label class="layui-form-label">角色信息：</label>
                <div class="layui-input-inline">
                    <input name="name" type="text" class="layui-input" autocomplete="off" placeholder="名称，编码">
                </div>
            </div>
            <div>
                <button class="layui-btn layui-btn-normal" id="btnSearch">
                    <i class="layui-icon layui-icon-search"></i>搜索
                </button>
                <button class="layui-btn layui-btn-primary v-top" id="btnReset">
                    <i class="layui-icon layui-icon-fonts-clear"></i>清空
                </button>
            </div>
        </div>
    </form>
    <div class="data_table">
        <table class="layui-hide" id="datagrid" lay-filter="datagrid"
               lay-data="{id: &#39;datagrid&#39;}" lay-size="sm"></table>
    </div>

    <#--编辑表单-->
    <div id="dataModel" class="data-model">
        <form class="layui-form" action="">
            <div class="layui-form-item">
                <div class="layui-inline">
                    <label class="layui-form-label">角色名称</label>
                    <div class="layui-input-inline">
                        <input type="text" name="roleName" lay-verify="required" autocomplete="off"
                               placeholder="请输入角色名称"
                               class="layui-input" readonly>
                    </div>
                </div>
                <div class="layui-inline">
                    <label class="layui-form-label">角色编码</label>
                    <div class="layui-input-inline">
                        <input type="text" name="roleCode" lay-verify="required" autocomplete="off"
                               placeholder="请输入角色编码"
                               class="layui-input" readonly>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <label class="layui-form-label">授权菜单</label>
                <div class="layui-input-block">
                   <div id="menuTree" class="menu-tree">

                   </div>
                </div>
            </div>

            <div class="layui-form-item btn-opt">
                <div class="layui-input-block">
                    <button type="submit" id="formSubmitBtn" class="layui-btn" lay-submit="form_submit_btn"
                            lay-filter="form_submit_btn">授权
                    </button>
                </div>
            </div>
        </form>
    </div>
</div>
<script type="text/javascript" src="/static/assets/jquery/jquery-3.5.1.js"></script>
<script type="text/javascript" src="/static/assets/layui-v2.5.6/layui.js"></script>
<script type="text/javascript" src="/static/js/page.js"></script>
<script type="text/javascript" src="/static/js/base_system/role_authorization.js"></script>
</body>
</html>